﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="div_scroll.aspx.cs" Inherits="temp_div_scroll" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>锁定表头（层）</title>
    <script type="text/javascript">
        window.onscroll=function(){
	        var header=document.getElementById("Header1");
	        if(header){
		        var bodytop=document.documentElement.scrollTop;
		        var top=bodytop-10; //滚进上面的高度
		        //var top=bodytop-startScrollHeight;
		        header.style.top=(top>0?top:0)+"px";		
	        }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div id='Header1' style='position: relative;'>
            <table width='800' border='1' cellspacing='0' cellpadding='0'>	
                <tr>
                    <th rowspan='2' width='36'>勾选您关注的基金</th>
                    <th rowspan='2' width='30'>序号</th>
                    <th rowspan='2' width='70'>基金代码</th>
                    <th rowspan='2' width='250'>基金简称</th>
                    <th colspan='4'>2008-10-15</th>
                    <th colspan='2'>2008-10-14</th>
                    <th colspan='2'>基金状态</th>
                    <th rowspan='2' width='50'>销售机构</th>
                </tr>
                <tr>
                    <th width='70'>单位净值</th>
                    <th width='70'>累计净值</th>
                    <th width='70'>日增长值</th>
                    <th width='70'>日增长率</th>
                    <th width='70'>单位净值</th>
                    <th width='70'>累计净值</th>
                    <th width='40'>申购</th>
                    <th width='40'>赎回</th>
                </tr>
            </table>
        </div>
        <table>
        <tr height="1000">
        <td>dfsdf</td>
        </tr>
        </table>
    </div>
    </form>
</body>
</html>
